home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / HELPLESS / HELPLESS._-_
Text File  |  1991-12-11  |  2KB  |  38 lines

  1.  
  2. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ   HELPLESS    ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  3.  
  4. Helpless removes the help menu from the menubar.
  5.  
  6. There shouldn't be any ill side effects of this INIT, the Help menu still exists, it just doesn't show up on the menubar. Any programs which use it (including the Finder) don't realize that the user doesn't have access to the menu, they just go ahead and manipulate the menu as if it were visible. All programs which follow the rules should be OK.
  7.  
  8. However, this is a hack and as such, there is sure to be incompatabilities. Please let me know if you find any.
  9.  
  10. I'd also like any comments at all about it, even just to say you picked it up.
  11.  
  12. I can be reached at:
  13.  
  14.   Carl W. Haynes III
  15.   Haynes Consulting
  16.   PO Box 2715
  17.   W. Lafayette, IN 47906
  18.  
  19.   Internet: haynes@mace.cc.purdue.edu
  20.   AOL: CWH3
  21.  
  22. -----------------
  23. This program and it's source are FREE and in the public domain. 
  24. You may use as you please.
  25.  
  26. Released: December 1991
  27.  
  28. -----------------
  29.  
  30. Technical stuff:
  31.  
  32. Helpless works through a head patch to InsertMenu. When InsertMenu is called, Helpless checks if the string in the Resource 'STR ' -4048 is contained within the first menu item. On US systems the resource string is "About Balloon Help" since the 1st menu item of Balloon help is "About Balloon Help..." this returns true. The menu then is changed so that it believes that it is a hierchical menu. Since the menu is never inserted as a hierachcal menu, it just floats around. The Menu is still created and the Handle is valid so all calls to the Help Manager dealing with this menu are still OK.
  33.  
  34. To make this compatable with foreign systems, just change the string in 'STR ' -4048 to one which is a substring of your Help Menu's first item.
  35.  
  36. (I told you this was a hack!)
  37.  
  38.